package com.gxa.modules.app.outpatient.outpatientfee.controller;


import com.gxa.common.utils.Result;
import com.gxa.modules.app.outpatient.outpatientfee.dto.OutPatientfee;
import com.gxa.modules.app.outpatient.outpatientfee.service.OutpatientfeeService;
import com.gxa.modules.model.entity.fee.Patient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName PatientContorller
 * @Description
 * @Author Mr.YUAN
 * @Date 2022/11/12 11:33
 */
@RestController
@Api(tags = "门诊费用接口")
@RequestMapping("/outpatientfee")
public class OutpatientfeeContorller {
    @Autowired
    private OutpatientfeeService outpatientfeeService;

    @ApiOperation("查询诊人费用")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query",name = "id",value = "就诊人的id",dataType = "int"),
            @ApiImplicitParam(paramType = "query",name = "startTime",value = "开始时间",dataType = "String"),
            @ApiImplicitParam(paramType = "query",name = "endTime",value = "结束时间",dataType = "String"),
    })
    @GetMapping("/list")
    public Result list(Integer id,String startTime,String endTime){
        List<OutPatientfee> outPatientfees = outpatientfeeService.queryById(id ,startTime,endTime);
        return new Result().ok(outPatientfees);
    }
}